package com.rest;

import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.api.model.ApiUser;
import com.sun.istack.NotNull;

@Path("/login")
public interface LoginService {

	@POST
	@Path("/")
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	ApiUser login(@NotNull LoginRequest request);

	@POST
	@Path("/form")
	@Produces(MediaType.APPLICATION_JSON)
	ApiUser loginByForm(@NotNull @FormParam("username") String username, @NotNull @FormParam("password") String password,
			@NotNull @FormParam("scheme") String scheme, @NotNull @FormParam("host") String host);
}
